<template>
  <div>
    <ul>
      <li>{{ id }}</li>
      <li>{{ title }}</li>
      <li>{{ content }}</li>
    </ul>
  </div>
</template>

<script setup lang="ts" name="Detail">
  import { computed, onMounted, reactive, toRefs } from 'vue'
  import { useRoute } from 'vue-router';

  // 传参方式一
  const route = useRoute()
  const news = computed(() => {
    return route.params
  })
  const news1 = reactive(route.params)

  // 传参方式二
  defineProps(['id', 'title', 'content'])
  console.log(23, news1)
</script>

<style lang="less" scoped>
ul {
  list-style: none;
}
</style>